<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<title>上传页面</title>
<link href="plug-in/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="plug-in/bootstrap/css/default.css">
<link href="plug-in/bootstrap/css/fileinput.css" media="all" rel="stylesheet"
	type="text/css" />
<script src="plug-in/bootstrap/js/jquery.min.js"></script>
<script src="plug-in/bootstrap/js/fileinput.js" type="text/javascript"></script>
<script src="plug-in/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
</head>

<body>
	<!-- enctype 默认是 application/x-www-form-urlencoded -->
	<form action="FileUpLoad"
		style="width: 70%; margin-left: 25%; margin-top: 2%;text-align:left "
		enctype="multipart/form-data" method="post">
		<div align="center">文件上传
		</div>
		<div style="width: 98%">
		    <label for="file1" class="col-sm-2 control-label"></label>
			<input id="file-0a" name="file1" class="file" type="file" style="width: 70%" multiple
				data-min-file-count="1"><br/>
		</div>
		<div class="form-group">
			<label for="docName" class="col-sm-2 control-label">文件名</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="docName" style="width: 70%;height: 30px;" name="docName"
					placeholder="请输入文件名">
			</div>
		</div>
		<div class="form-group">
			<label for="docLabel" class="col-sm-2 control-label">标签</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="docLabel" style="width: 70%;height: 30px;"  name="docLabel"
					placeholder="请输入标签">
			</div>
		</div>
		<div class="form-group">
			<label for="docDesc" class="col-sm-2 control-label">描述</label>
			<textarea class="form-control" style="width: 70%;height: 100px;"  name="docDesc" rows="3"></textarea>
		</div>
		<button type="submit" class="btn btn-primary">
			提交
			</button>
	</form>
</body>
</html>
<script type="text/javascript">
(function ($) {
    "use strict";

    $.fn.fileinput.locales.zh = {
        fileSingle: '文件',
        filePlural: '多个文件',
        browseLabel: '选择 &hellip;',
        removeLabel: '移除',
        removeTitle: '清除选中文件',
        cancelLabel: '取消',
        cancelTitle: '取消进行中的上传',
        uploadLabel: '上传',
        uploadTitle: '上传选中文件',
        msgSizeTooLarge: '文件 "{name}" (<b>{size} KB</b>) 超过了允许大小 <b>{maxSize} KB</b>. 请重新上传!',
        msgFilesTooLess: '你必须选择最少 <b>{n}</b> {files} 来上传. 请重新上传!',
        msgFilesTooMany: '选择的上传文件个数 <b>({n})</b> 超出最大文件的限制个数 <b>{m}</b>. 请重新上传!',
        msgFileNotFound: '文件 "{name}" 未找到!',
        msgFileSecured: '安全限制，为了防止读取文件 "{name}".',
        msgFileNotReadable: '文件 "{name}" 不可读.',
        msgFilePreviewAborted: '取消 "{name}" 的预览.',
        msgFilePreviewError: '读取 "{name}" 时出现了一个错误.',
        msgInvalidFileType: '不正确的类型 "{name}". 只支持 "{types}" 类型的文件.',
        msgInvalidFileExtension: '不正确的文件扩展名 "{name}". 只支持 "{extensions}" 的文件扩展名.',
        msgValidationError: '文件上传错误',
        msgLoading: '加载第 {index} 文件 共 {files} &hellip;',
        msgProgress: '加载第 {index} 文件 共 {files} - {name} - {percent}% 完成.',
        msgSelected: '{n} {files} 选中',
        msgFoldersNotAllowed: '只支持拖拽文件! 跳过 {n} 拖拽的文件夹.',
        dropZoneTitle: '拖拽文件到这里 &hellip;',
        slugCallback: function(text) {
            return text ? text.split(/(\\|\/)/g).pop().replace(/[^\w\u4e00-\u9fa5\-.\\\/ ]+/g, '') : '';
        }
    };

    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.zh);
})(window.jQuery);

</script>
